﻿using AutoMapper;
using HomeCloudStorageSystem.Dtos;
using HomeCloudStorageSystem.Models;

namespace HomeCloudStorageSystem.Profiles
{
    public class FileDirectoryProfile:Profile
    {
        public FileDirectoryProfile()
        {
            CreateMap<FileDirectoryForCreationDto, FileDirectory>()
                .ForMember(
                    dist => dist.CreateTime,
                    op => op.MapFrom(src => DateTime.Now.ToString("yyyy-MM-dd"))
                    );
        }
    }
}
